package com.xnfh.home.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.xnfh.framework.bean.PlanSchemeBean
import com.xnfh.framework.utils.TimeUtils
import com.xnfh.home.R

/**
 * @Description:俱乐部-种植方案item
 * @Author: ziheng
 * @CreateDate: 2023/10/11 4:18 PM
 * @UpdateUser: ziheng
 * @UpdateDate: 2023/10/11 4:18 PM
 * @UpdateRemark: 更新说明
 */
class PlantingSchemeAdapter: BaseQuickAdapter<PlanSchemeBean,BaseViewHolder>(R.layout.item_planting_scheme) {
    override fun convert(holder: BaseViewHolder, item: PlanSchemeBean) {
        holder.setText(R.id.item_planting_scheme_lable,item.udc_name)
        holder.setText(R.id.item_planting_scheme_title,item.plan_name)
        holder.setText(R.id.item_planting_scheme_content,item.content)
        holder.setText(R.id.item_planting_scheme_type,item.plan_name)//这个老版本是注释掉的
        //时间老版本没有展示
        val formatMsData = TimeUtils.formatData(TimeUtils.dateFormatYMDHMS, item.lastupdatedat)
        holder.setText(R.id.item_planting_scheme_data,formatMsData)
    }
}